package com.travel.service.Service;

import com.travel.model.dto.comment.CommentRequest;
import com.travel.model.dto.comment.RatingStats;
import com.travel.model.dto.service.AuditDTO;
import com.travel.model.dto.service.BookingRequest;
import com.travel.model.dto.service.ServiceDTO;
import com.travel.model.entity.content.Comment;
import com.travel.model.entity.service.Booking;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
//旅游服务 获取所有服务 获取特定城市服务 获取特定服务 创建服务 更新服务 删除服务 搜索服务 添加评论 获取评论 获取评分统计
public interface TravelService {
    // 服务相关
    Page<ServiceDTO> getServices(String city, String type, Pageable pageable);
    ServiceDTO createService(ServiceDTO serviceDTO);
    ServiceDTO updateService(Long id, ServiceDTO serviceDTO);
    void deleteService(Long id);
    void updateServiceStatus(Long id, Integer status);
    List<ServiceDTO> getPublicServices();
    ServiceDTO getServiceDetail(Long id);
    Page<ServiceDTO> getAllServices(Pageable pageable);
    void auditService(Long id, AuditDTO auditDTO);
    List<ServiceDTO> getUserServices(Long userId);

    // 预订相关
    Booking createBooking(BookingRequest request);
    Page<Booking> getUserBookings(Pageable pageable);

    // 评论相关
    @Transactional
    Comment addComment(Long serviceId, CommentRequest request);
    List<Comment> getComments(Long serviceId);
    void deleteComment(Long commentId, Long userId);

    RatingStats getServiceRating(Long serviceId);
} 